<div class="box">
    
  <div class="box-header">

    <div class="row">
        <div class="col-sm-5">
            <ob_link><a class="btn" href="{:url('discount/member')}"><i class="fa fa-plus"></i> 新增会员折扣</a></ob_link>
          
        </div>
        
        <div class="col-sm-7">
            <div class="box-tools search-form pull-right">
                <div class="input-group input-group-sm">
                    
                    <input type="text" name="search_data" style="width: 200px;" class="form-control pull-right" value="{:input('search_data')}" placeholder="支持昵称|用户名|邮箱|手机">

                    <div class="input-group-btn">
                      <button type="button" id="search"  url="{:url('memberlist')}" class="btn btn-info btn-flat"><i class="fa fa-search"></i></button>
                    </div>

                </div>
           </div>
        </div>
    </div>
    
  </div>
    
    
  <div class="box-body table-responsive">
    <table  class="table table-bordered table-hover">
      <thead>
      <tr>
       
          <th>用户名</th>
          <th>级别</th>
          <th>比例</th>
          <th>创建时间</th>
          <th>操作</th>
      </tr>
      </thead>
      {notempty name='list'}
        <tbody>
            {volist name='list' id='vo'}
                <tr>
                  <td>
                  	{$vo.nickname}
                  	
                  </td>
                  <td>
                  	
                  	{if condition="$vo.rank_id eq '1'"}
                  		<span class="label" style="background-color: red;">普通会员</span>
                  	{elseif condition="$vo.rank_id eq '2'"}
                  		<span class="label" style="background-color: orange;">中级会员</span>
                  	{elseif condition="$vo.rank_id eq '3'"}
                  		<span class="label" style="background-color: #FE7C7C;">高级会员</span>
                  	{elseif condition="$vo.rank_id eq '4'"}
                  		<span class="label" style="background-color: green;">黄金代理</span>
                  	{elseif condition="$vo.rank_id eq '5'"}
                  		<span class="label" style="background-color: blue;">铂金代理</span>
                  	{else/}
                  		<span class="label" style="background-color: #8C08F1;">钻石代理</span>
                  	{/if}
                  </td>
                  <td>{$vo.discount}%</td>
                  <td>{$vo.create_time}</td>
              
                  <td class="col-md-3 text-center">
                  	<ob_link><a href="{:url('discountedit', array('id' => tp_encrypt($vo['id'])))}" class="btn"><i class="fa fa-edit"></i> 编 辑</a></ob_link>
                  	&nbsp;&nbsp;
                		<ob_link><a class="btn confirm ajax-get"  href="{:url('discountdel',array('id' => tp_encrypt($vo['id'])))}"><i class="fa fa-trash-o"></i> 删 除</a></ob_link>
                  </td>
                </tr>
            {/volist}
        </tbody>
        {else/}
        <tbody><tr class="odd"><td colspan="8" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
      {/notempty}
      
    </table>
  </div>

  <div class="box-footer clearfix text-center">
		{$list->render()}
  </div>

</div>

<script>
    //导出功能
    $(".export").click(function(){
        
        window.location.href = searchFormUrl($(".export"));
    });
</script>